package cn.forward.controller.manager.app;


import cn.dev33.satoken.annotation.SaIgnore;
import cn.forward.result.R;
import cn.forward.service.IDriverService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.aspectj.bridge.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

@Tag(name = "小程序司机注册对象",description = "小程序司机注册")
@RestController
@RequestMapping("/app/driver")
public class AppDriverController{

    @Autowired
    public IDriverService driverService;

    @Operation( summary= "保存司机注册信息",description = "保存司机注册信息接口")
    @Parameter(name = "openCod",description = "获取手机号的cod",required = true)
    @GetMapping(value = "/register/{openIdCod}")
    @SaIgnore
    public R<Void> register(@PathVariable("openIdCod") String openIdCod){
        driverService.register(openIdCod);
        return R.success();
    }



}
